{% extends 'base.html.twig' %}
{% import 'Import/app_import.html.twig' as appImport %}

{% block head_title %}{{ 'slm_short'|trans }} - {{ 'status'|trans }}{% endblock %}

{% block heading_1 %}
    {{ appImport.heading({'level': 1, 'title': 'slm'|trans}) }}
{% endblock %}

{% block tabs %}
    {% include 'Modules/slm/slm_tabs.html.twig' with {'active': 'status'} %}
{% endblock %}

{% block main_content %}
    {% embed 'Embed/block_embed.html.twig' %}
        {% import 'Import/app_import.html.twig' as appImport %}
        {% block content %}
            {{ appImport.heading({'level': 3, 'title': 'status'|trans}) }}

            {% embed 'Embed/buttons_embed.html.twig' %}
                {% import 'Import/app_import.html.twig' as appImport %}
                {% block content %}
                    {% if 'RUNNING' == status['operation_mode'] %}
                        {{ appImport.buttonModal({
                            'id': 'SlmStop',
                            'title': 'stop'|trans,
                            'href': path('slm_stop'),
                        }) }}
                    {% else %}
                        {{ appImport.buttonModal({
                            'id': 'SlmStart',
                            'title': 'start'|trans,
                            'href': path('slm_start'),
                        }) }}
                    {% endif %}
                {% endblock %}
            {% endembed %}

            <hr>

            <div class="row">
                {{ appImport.dashboardKpi({'title': 'operation_mode'|trans, 'badge': {'title': status['operation_mode']|lower|trans, 'context': status['operation_mode']|lower}}) }}
            </div>
        {% endblock %}
    {% endembed %}
{% endblock %}
